// components/searchBar/searchBar.js
Component({
  options: {
    addGlobalClass: true
  },
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    placeHolder: ''
  },

  ready: function () {
    this.setData({placeHolder: '输入关键词搜索'})
  },

  /**
   * 组件的方法列表
   */
  methods: {
    onFilter: function() {
      var myEventDetail = {} // detail对象，提供给事件监听函数
      var myEventOption = {} // 触发事件的选项
      this.triggerEvent('onFilter', myEventDetail, myEventOption)
    },
    onSearch: function (e) {
      var myEventDetail = e.detail.value
      var myEventOption = {} // 触发事件的选项
      this.triggerEvent('onSearch', myEventDetail, myEventOption)
    },
    onFocus: function() {
      var myEventDetail = {} // detail对象，提供给事件监听函数
      var myEventOption = {} // 触发事件的选项
      this.triggerEvent('onFocus', myEventDetail, myEventOption)
    },
  },
  
})
